package com.dd.ms.auth.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

/**
 * @Author liuxianmeng
 * @CreateTime 2025/7/10 9:48
 * @Description 角色VO
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@ApiModel("角色VO")
public class RoleVO implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "角色ID 自增主键")
    private Long roleId;
    @ApiModelProperty(value = "角色名称 不能为空")
    private String roleName;
    @ApiModelProperty(value = "角色描述")
    private String roleDesc;
    @ApiModelProperty(value = "角色有效期开始时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime validityPeriodStart;
    @ApiModelProperty(value = "角色有效期结束时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime validityPeriodEnd;

    @ApiModelProperty(value = "角色所具有的权限")
    private List<PermissionVO> permissions;
}
